    <!DOCTYPE html>
<html>
<head>
<title><?php echo $title ?></title>
<meta charset="UTF-8">
<meta name='viewport' content='width=device-width; initial-scale=1.0; minimum-scale=1.0; maximum-scale=1.0'>
</head>
<body>
<?php include('config.php');/*引入变量文件*/?>
<style>
<?php include('css/index.css');/*引入css文件*/?>
</style><?php
$link = $_GET['link']; //获取短链接参数
if($link != null){
$message = file_get_contents($file);//读取文件
//转化为数组
$pieces = explode("【", $message);
$arrlength = count($pieces);
for ($i = 1; $i < $arrlength; $i++) {
    $data = $pieces[$x];
    $wz = strstr($data, '】', true);//截取长网址
    $hz = strstr(strstr($data, "〖"), "〗", true);//截取后缀
    $hz = str_replace("〖", "", $hz);
    //查询原网址
if($link ==nl2br(htmlentities($hz,ENT_QUOTES,"UTF-8"))){
echo"<title>正在跳转中……</title>";
header("Location:".$wz); //跳转到原链接
$i="1";
        }}
if($i != '1'){
if($link!=NULL){
        exit("<title>网址不存在QAQ</title><br><br><br><br><br><br><img src='img/jinggao.png' style='width:220px;height:220px;display:block;margin:20px auto;' /><h1><p style='text-align:center;color:#666;'>您访问的网址不存在</p></h1>");//网址不存在
}}}
if($qt == 2){
require_once('MkEncrypt.php');//密码文件
MkEncrypt($password);
}
if($qt == 1 or $qt == 2){//生成短链接
?>
<form action="send.php" method="post">
<div class="container">
<center>
<img src=<?php echo $logo ?> width="210" alt=<?php echo $title ?> />
<h2><?php echo $title ?></h2>
请输入您即将缩短的网址
<input type="text" name="wz"><br><br>
<?php echo $ym ?>/
<input type="text" name="hz"><br><br>
备注（选填）
<input type="text" name="bz"><br>
<br>
<input type="submit" value="提交">
</form>
<br><br>
<?php echo $bq ?>
</center></div><?php
}
if($qt == 3){
include('shouye.php');//首页文件
}
?>
</body>
</html>